package packaging;
import java.sql.*;


public class setben {
	public bean seben (int id){
		check pp=new check();
		String sql="select * from imp where p_id="+id;
		ResultSet rs=pp.indexs(sql);
		bean pl=null;
		
		try {
			if(rs.next()){
				pl = new bean();
				pl.setImgid(rs.getInt("p_id"));
				pl.setImgimg(rs.getString("p_img"));
				pl.setImgname(rs.getString("p_name"));
				pl.setImgnewprice(rs.getDouble("p_newprice"));
				pl.setImgoldprice(rs.getDouble("p_oldprice"));
			
			}
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return pl;
	
	
	
	
	
	}

}
